import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../components/login.vue'
import forget from '../components/forget.vue'
import modify from '../components/modify.vue'
import home from '../components/home.vue'
import form from '../components/form.vue'
import shenpi from '../components/shenpi.vue'
import submitted from '../components/submitted.vue'
import number from '../components/number.vue'
import record from '../components/record.vue'
import information from '../components/information.vue'
import register from '../components/register.vue'

Vue.use(VueRouter)

const routes = [
    { path: '/', redirect: '/login' },
    { path: '/register', component: register },
    { path: '/login', component: login },
    { path: '/forget', component: forget },
    { path: '/modify', component: modify },
    {
        path: '/home',
        component: home,
        redirect: '/form',
        children: [
            { path: '/form', component: form },
            { path: '/shenpi', component: shenpi },
            { path: '/number', component: number },
            { path: '/record', component: record },
            { path: '/submitted', component: submitted },
            { path: '/information', component: information },
        ]
    },
]

const router = new VueRouter({
    mode: 'hash',
    base: process.env.BASE_URL,
    routes
})

export default router